import React from "react"
import { useParams } from "react-router-dom"

import feCourse from "./feCourse"

const CourseList: React.FC = () => {
  const { id } = useParams()
  let course = feCourse.find(course => course.id === id)

  return (
    <div style={{ 'paddingLeft': 10 }}>
      <h4>{course?.name}</h4>
      <p>{course?.desc}</p>
    </div>
  )
}

export default CourseList
